package com.cet.designpatterns.adapter.classadapter;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-07 22:40
 **/
public class VoltageAdapter extends Voltage220V implements Voltage5V {

    @Override
    public int output5V() {
        int src = output220V();
        System.out.println("使用类适配器进行适配~~");
        int dest = src / 44;
        System.out.println("适配完成，转换后电压为" + dest + "V");
        return dest;
    }
}
